<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('site'); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>站点管理 </title>
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
<link href="templates/css/pagination.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="templates/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/layindex.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/common.js"></script>
<script src="../plugin/layer/layer.js"></script>

</head>

<body class="mainbody">

<div class="aspNetHidden">
</div>
<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
  <a href="home.php" class="home"><i></i><span>首页</span></a>
  <i class="arrow"></i>
  <span>站点列表</span>
  <a href="javascript:location.reload();" class="reload">刷新</a>
</div>
<!--/导航栏-->

<!--工具栏-->
<div id="floatHead" class="toolbar-wrap">
  <div class="toolbar">
    <div class="box-wrap">
      <a class="menu-btn"></a>
      <div class="l-list">
        <ul class="icon-list">
          <li><a class="add" href="site_add.php"><i></i><span>添加新站点</span></a></li>
        </ul>
      </div>
      <div class="r-list">
	  <form name="form3" id="form3" method="post" action="admin.php">
        <input name="keyword" type="text" id="keyword" class="keyword" />
        <input  class="btn-search" type="submit" value="搜索" style="cursor:pointer;">
		</form>
      </div>
    </div>
  </div>
</div>
<!--/工具栏-->
<form method="post" action="" id="form1">
<!--列表-->
<div class="table-container">
  
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
    <tr align="center">
      <th width="8%">ID</th>
      <th  width="37%">站点名称</th>
      <th width="35%">站点标识</th>
      <th width="15%">操作</th>
    </tr>
  
  	<?php

	$sql = "SELECT * FROM `#@__site`";
	if(!isset($checkPagenum)){$checkPagenum = $cfg_pagenum;}
	$dopage->GetPage($sql,$checkPagenum,'ASC');
	while($row = $dosql->GetArray())
	{
		if($row['id'] == 1)
			$delstr = '删除';
		else
			$delstr = '<a href="site_save.php?action=del&id='.$row['id'].'" onclick="return ConfDel(0);">删除</a>';
	?>
	<tr align="center" >
		<td  ><?php echo $row['id']; ?></td>
		<td ><?php echo $row['sitename']; ?></td>
		<td ><?php echo $row['sitekey']; ?></td>
		<td ><span><a href="site_update.php?id=<?php echo $row['id']; ?>">修改</a></span> | <span><?php echo $delstr; ?></span></td>
	</tr>

	<?php
	}
	?>

  </table>
  
</div>
<!--/列表-->

<!--内容底部-->
<div class="line20"></div>
<div class="pagelist">
  <div class="l-btns">
    <span>显示</span><input name="txtPageNum" type="text" value="<?php echo $checkPagenum;?>"  onblur="checkPagenum(this.id)"  onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="txtPageNum" class="pagenum" onkeydown="return checkNumber(event);" /><span>条/页</span>
  </div>
  <?php echo $dopage->GetList($sql,$checkPagenum); ?>

</div>
<!--/内容底部-->
</form>
</body>
</html>
